<!--
 * @Description: 草稿箱
 * @Author: Lihuanyu
 * @Date: 2021-09-06 17:52:17
 * @LastEditors: Lihuanyu
 * @LastEditTime: 2021-09-15 17:50:24
-->

<template>
  <view class="event-list">
    <view class="event-item" v-for="(item, index) in eventList" :key="index" @click="linkToDetail()">
      <cover-image :src="item.src" mode="aspectFit" class="img"></cover-image>
      <view class="info">
        <view class="title">{{ item.title }}</view>
        <view class="time">
          <text class="iconfont icon-shijian1"></text>
          <text>{{ item.time }}</text>
        </view>
      </view>
    </view>
  </view>
</template>

<script>
export default {
  data() {
    return {
      eventList: [
        {
          src: "https://img2.baidu.com/it/u=1678948314,1083480950&fm=26&fmt=auto&gp=0.jpg",
          title: "南山区发生洪涝灾害，请紧急处涝灾害",
          time: "2021-12-12 12:20:12",
        },
        {
          src: "https://img2.baidu.com/it/u=1678948314,1083480950&fm=26&fmt=auto&gp=0.jpg",
          title: "南山区发生洪涝灾害，请紧急处涝灾害",
          time: "2021-12-12 12:20:12",
        },
        {
          src: "https://img2.baidu.com/it/u=1678948314,1083480950&fm=26&fmt=auto&gp=0.jpg",
          title: "南山区发生洪涝灾害，请紧急处涝灾害",
          time: "2021-12-12 12:20:12",
        },
        {
          src: "https://img2.baidu.com/it/u=1678948314,1083480950&fm=26&fmt=auto&gp=0.jpg",
          title: "南山区发生洪涝灾害，请紧急处涝灾害",
          time: "2021-12-12 12:20:12",
        }
      ],
    };
  },
  methods: {
    // 信息详情
    linkToDetail() {
      uni.navigateTo({
        url: '/pages/report/report-detail'
      })
    },
  },
};
</script>

<style lang="scss" scoped>

.event-item{
  display: flex;
  justify-content: space-between;
  border-bottom: 2rpx solid #E4E7F0;
  padding: 48rpx 0;
  .img{
     max-width: 170rpx;
     max-height: 150rpx;
     border-radius: 8px;
  }
  .info{
    width: calc(100% - 190rpx);
    .title{
      color: #2B2B2B;
      font-size: 30rpx;
      margin-bottom: 24rpx;
    }
    .time{
      font-size: 22rpx;
      color: rgba($color: #2b2b2b, $alpha: 0.6);
      .iconfont{
        font-size: 22rpx;
        margin-right: 10rpx;
      }
    }
  }
}
</style>>

